#ifndef _NEPTUNER_FUNCALYZER_H_
#define _NEPTUNER_FUNCALYZER_H_


#include "Scubserver.h"
#include "Method.h"
#include<vector>

class Funcalyzer :
    public Scubserver
{
public:
	//private:
    std::vector<Method*> m_apxMethod;
    Method * m_pxMethod;
    int m_nDepthMax;

	int m_nSerialNumber;

	bool		m_bInsideFunction;
	bool		m_bFuncDefActive;
    bool		m_bReturnActive;
    bool		m_bFuncCallActive;
    std::string	m_sFuncCall;

private:
    void onEntryParen(Scope& inOldScope);
    void onEntryBlock(Scope& inOldScope);
    void onEntryComment(Scope& inOldScope);
    void gatherParameters(Scope& inOldScope);

public:
    virtual void onNewToken(Scope& inScope, Token& inToken);
    virtual void onScopeEntry(Scope& inNewScope, Scope& inOldScope);
    virtual void onScopeExit(Scope& inNewScope, Scope& inOldScope);

    Funcalyzer(void);
    ~Funcalyzer(void);

	friend class Submarine;
};

#endif
